﻿using OpenGameEngine;
using System.Windows.Forms;
using ChopperGame.Scenes;
using OpenGameEngine.Audio;

namespace ChopperGame
{
    public class ChopperGame : GameEngine
    {
        public ChopperGame()
            : base()
        {
            if (!AudioEngine.Running)
                AudioEngine.StartEngine();
        }

        protected override void LoadContent()
        {
            base.LoadContent();

            this.Scenes.Add(new IntroScene());
            this.Scenes.Add(new MenuScene());
            this.Scenes.Add(new PlayScene());

            this.SwitchScene("IntroScene");
        }

        protected override System.Windows.Forms.Control CreateHostControl(OpenGameEngine.Base.GameConfiguration config)
        {
            Form f = base.CreateHostControl(config) as Form;

            if (f != null)
                f.MaximizeBox = false;

            return (f != null) ? f : base.CreateHostControl(config);
        }
    }
}
